package com.zhao.service.impl;

import com.zhao.bean.AddressBook;
import com.zhao.dao.AddressBookDao;
import com.zhao.service.AddressBookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional
@Service
public class AddressBookServiceImpl implements AddressBookService {

    @Autowired
    private AddressBookDao dao;

    /**
     * 管理地址——修改地址
     *
     * @param addressBook
     * @return
     */
    @Override
    public int BaoCun(AddressBook addressBook) {

        return dao.updateById(addressBook);
    }

    /**
     * 管理地址——删除地址
     *
     * @param ids
     * @return
     */
    @Override
    public int Delete(Long ids) {
        return dao.deleteById(ids);
    }
}
